home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / VideoToolbox 96.06.15 / (Notes) / Changes 1990-3.doc < prev    next >
Text File  |  1994-11-05  |  32KB  |  292 lines

  1. VideoToolbox: Changes 1990-3
  2.  
  3. CHANGES DURING 12/93:
  4. •Finished upgrade to THINK C 6.01. Nearly all of the VideoToolbox projects appear twice. Files with the extension ".π5" are in version 5 format, and those with the extension ".π" are in version 6 format. THINK C 6 will read either format of project file (converting it to the new format), but THINK C 5 will say "Unknown error ID=-192" if you try to open a version 6 project. In either case, follow the instructions in VideoToolbox.c to produce the precompiled header "VideoToolbox.pre", since it must be produced by your version of the compiler. (Note that the THINK C 5 project files have not been updated since June '93, and are becoming seriously out of date.) I suggest all users of the VideoToolbox upgrade to THINK C 6.01.
  5. •Added GetVersionString.c, based on Joseph Laffey's GetVersStr.c, which gets the application's version from its 'vers' resource. Thanks!
  6. •Added new sections on "HIGH FRAME RATES" and "MORE THAN 8-BIT DACS" to the "Video synch" file.
  7. •Corrected capitalization of all textual references to the commercial "MATLAB" program. Renamed MatlabMain.h to MATLABMain.h and ReadMatLabFile.c to ReadMATLABFile.c. These changes are innocuous because only the filenames were changed and the only change was in the capitalization, which is ignored by the Macintosh file manager. 
  8. •The demo Quitter now goes away quietly if you hit Cancel.
  9.  
  10. CHANGES DURING 11/93:
  11. •Added new section on "SYNCHING MULTIPLE VIDEO CARDS TO EACH OTHER" to the "Video synch" file.
  12.  
  13. CHANGES DURING 10/93:
  14. •Updated Quick3 to use either the old CricketGraph or the new CA-CricketGraphIII.
  15.  
  16. CHANGES DURING 9/93:
  17. •Added PixMapToPICT.c, which saves a section of a PixMap as a PICT file.
  18. •Renamed TranslateText.c to TranslateLinefeeds.c and enhanced it to work with arbitrarily large text strings and to implement macros as inline code.
  19. •Added MATLABMain.h, which should be #included in the main C file of your THINK C MATLAB project.
  20. •Deleted Assign.h, after merging its contents into VideoToolbox.h.
  21. •Added symbol MAC_C to VideoToolbox.h to allow VideoToolbox.h (and many C files) to be compiled even on non-Macintosh computers. MAC_C is true only if the compiler supports the Macintosh extensions to C, e.g. the keyword "pascal".
  22. •Added GetTimeDateString.c.
  23. •Moved Require() from PrintfExit.c to Require.c. Enhanced Require.c to check for consistency of sizeof(int) among Require(), the (possibly precompiled) VideoToolbox.h header, and the Standard C library.
  24. •Renamed the precompiled header from "VideoToolbox" to "VideoToolbox.pre". Think of ".pre" as standing for both "precompiled" and "prefix", which is the window you type the #include command into. You should use VideoToolbox.c to create "VideoToolbox.pre". You may use VideoToolboxMATLAB.c to create "VideoToolboxMATLAB.pre".
  25. •Added PrintWrappedText() and PrintWrappedTextToFile() to BreakLines.c.
  26. •Enhanced Assign.c by adding new routines written by David Brainard: OpenCalFileWrite, OpenCalFileRead, OpenCalFileReadAndCheck, AppendDescriptions, CopyDescriptions, AllocateDescriptions, FreeDescriptions, NumberOfDescriptions, NullDescription, and IsNullDescription.
  27.  
  28. CHANGES DURING 8/93:
  29. •Enhanced Assign.c to support arrays with an arbitrary number of dimensions (up to ASSIGN_DIMS) and dynamic dimensioning and allocation of arrays based on the assignments that appear in the assignment file. Renamed "Variable" to "Description". Renamed most of the routines. The header file Assign92.h provides for backward compatibility.
  30. •Polished GetWindowDevice(), based on answer from DEVSUPPORT, for better compatibility with future versions of 32-bit QuickDraw.
  31.  
  32. CHANGES DURING 7/93:
  33. •The MATLAB symbol is now defined as 1 or 0 instead of being defined or left undefined. The advantage of this approach is that the MATLAB symbol can now be used as an argument in an ordinary if statement, which is much more readable than #if.
  34. •All routines now call SwapMMUMode() only if gestalt32BitCapable is true.
  35. •Enhanced GDDacSize() in GDVideo.c to return 8 unless the driver provides a valid gamma table, for compatibility with video drivers, e.g. the Radius PowerView, that return invalid gamma tables.
  36. •TimeVideo 2.5.2 recompiled with new GDDacSize().
  37.  
  38. CHANGES DURING 6/93:
  39. •Upgraded to THINK C 6.
  40. •Assign.c: Removed all Macintosh dependencies, leaving pure Standard C. Added support for shortDoubleType and arrays of stringType.
  41. •New IsCmdPeriod.c accepts an event record and returns true or false, indicating whether the user has hit command period. Should work even on international systems that do keyboard remapping.
  42. •New OpenPreferencesFolder.c opens the Preferences folder in the System Folder, creating it if necessary.
  43. •PixMapToPostScript.c now accepts a pixmap handle instead of a pointer, relieving the user of the responsibility of making sure that the handle was locked before being dereferenced. Fixed silly bug, introduced 5/27/93, that suppressed all hex data.
  44. •In ReadMatLabFile.c: Added LoadNamedMatIntoShorts and LoadNamedMatIntoDoubles. Renamed LoadMatShorts and LoadMatDoubles to LoadNextMatIntoShorts and LoadNextMatIntoDoubles.
  45. •SetPixelsQuickly.c is now callable as a MatLab resource, thanks to detective work and tricky work-around by David Brainard.
  46.  
  47. CHANGES DURING 5/93:
  48. •Due to a reorganization of the info-mac ftp site, the latest VideoToolbox is now at info-mac/Development/SourceCode/.
  49. •Assign.c is the new name for the former ReadAssignments.c, which has been significantly enhanced. This runtime C interpreter reads and executes any text "assignment" file that contains only C assignments and comments. It can also write an assignment file, making the assignment file a portable way of recording calibrations and experimental parameters. New features include optionally ignoring unknown variables, support for arrays, optional return of an error code in place of calling PrintfExit, and checking of name syntax.
  50. •Added MultipleChoice.c, accepts one character response (with default) and spells out whole answer. YesOrNo(), formerly in kbhit.c, accepts y/n and spells out "Yes" or "No".
  51. •Enhanced GetWindowDevice() to support GWorld's.
  52. •Updated Quick3 and CalibrateLuminance to use version 2 of Numerical Recipes in C.
  53. •TimeVideo 2.5 tests all video devices on any Mac running System 6.05 or later. It tests gray and color modes, and measures and reports the gray-mode color-transformation matrix. It no longer assumes any particular correspondence between the video mode number and the pixel size. Many small bug fixes.
  54. •SetEntriesQuickly.c now respects the setting of the device's gray/color mode, and maps to gray when appropriate. Changed prototype of macltset to specify the red, green, and blue arrays as "unsigned short" instead of "short".
  55. •Luminance.c: If the driver is in gray mode (i.e. not color) then LoadLuminances maps rgb to gray by simply copying the green component to the red and blue components.
  56. •GDVideo.c: Changed GDPrintGammaTable() to accept a simple file pointer instead of an array of two file pointers.
  57. •GrabSlotDrivers now checks for presence of the Slot Manager, in response to bug report by Jonathan Brecher.
  58.  
  59. CHANGES DURING 4/93:
  60. •Updated all projects and "Read me".
  61. •Added explanation of tiling to PixMapToPostScript.c.
  62. •GetPixBaseAddr32(PixMap **pm) returns the 32-bit address of the pixels/bits in a pix/bitmap. In RectToAddress.c.
  63. •SetEntriesQuickly.c no longer requires a 68020.
  64. •MaximizeConsoleHeight.c now fully supports 1-bit QuickDraw.
  65. •Deleted obsolete AddressToSlot and AddressToScreenDevice from GetScreenDevice.c.
  66. •Merged GDFrameRate.c and GDTimeClut.c to produce GDTime.c. Deleted obsolete GDFramesPerClutUpdate, GDClutUpdateRate, and GDTimeClutUpdate.
  67. •GDCOLORS(device) is gone because its answer was misleading when in 16-bit or 32-bit mode. Instead, use either GDClutSize(device) or GDColors(device), in GDVideo.c, but take care to choose the right one, since they're not equivalent when in more-than-8-bit modes.
  68. •GDVideo.c: Removed assumption, in all routines, that there is any particular correspondence between the video mode number and the pixel size. New GDHasMode(device,mode,&pixelSize,&pages) tells you whether a particular video mode is supported by your video device. Added GDPrintGammaTable(). Deleted GDModeName().
  69.  
  70. CHANGES DURING 3/93:
  71. •Made RectToAddress compatible with the initial versions of 32-bit QuickDraw, in which GetPixmapBaseAddr() did not work.
  72. •Enhanced TimeVideo, producing a more comprehensive and intelligible report, and subsuming the former TestCluts, which is now gone.
  73. •GDSetEntriesByType(device,...) checks the (**device).gdType field and calls GDSetEntries, GDDirectSetEntries, or nothing, as appropriate. In GDVideo.c.
  74. •GDSetEntriesByTypeHighPriority does the same, but at high processor priority, forcing the driver to behave synchronously. In GDVideo.c.
  75. •GDInfo.c collects useful information about a video device. In GDVideo.c
  76. •IdentifyVideo(device) returns a descriptive C string.  In Identify.c,.
  77. •Added the constant MAX_SCREENS=8 to VideoToolbox.h
  78. •GDSaveGamma(device) saves a copy that GDRestoreGamma(device) later uses to restore the gamma table. In GDVideo.c.
  79. •Added UnclipScreen(device), RestoreScreenClipping(device), SquareCorners(device), and RestoreCorners(device) to HideMenuBar.c, to extend the clipping region to include the WHOLE screen.
  80. •GDOpenWindow/GDDisposeWindow call GDSaveGamma/GDRestoreGamma and UnclipScreen/RestoreScreenClipping.
  81.  
  82. CHANGES DURING 2/93:
  83. •Fixed endless loop in PatchMacIIciVideoDriver in GDVideo.c that hung up any program that called GDGetEntries, including the demos TestGDVideo and TestSetEntriesQuickly.
  84. •Enhanced PatchMacIIciVideoDriver to deal with ROM- as well as RAM-based video drivers.
  85. •Fixed SetEntriesQuickly to work correctly on Toby Video Card, Macintosh Display Card 8•24, and to work in 16-bit mode on Quadra.
  86. •VideoToolbox.c explains how to create a precompiled header, for tenfold faster compiles.
  87. •Greatly increased the number of headers included by VideoToolbox.h, so that most C files can now include just the VideoToolbox.h header.
  88. •Added tiny new demo, Grating.c, that shows how to load the clut and display a grating.
  89. •Added SetPixelsQuickly.c to quickly peek or poke a row of pixels, bypassing the color tables. It's more than ten times faster than using SetOnePixel.c, which is now obsolete. This is the fastest way to get at the pixels in an image, for image processing or synthesis. Works with bitmaps and pixmaps and any size of pixel. Try the demos Grating and FlickeringGrating.
  90. •GDOpenWindow now creates a full-screen window even on the main screen.
  91. •Added window=GDOpenWindow1(device) and GDDisposeWindow1(window), which work with a WindowPtr instead of a CWindowPtr, for less hassle with casting.
  92. •AddExplicitPalette(window), in GDOpenWindow.c, adds a palette with all colors marked as explicit, so that you can use PmForeColor and PmBackColor to specify literally what numbers you want to put into your pixels in drawing operations like EraseRect() and DrawString().
  93. •Added PrintfExit.c, which prints out an error message and exits. Replaced all calls to exit() in the VideoToolbox by calls to this routine, so many projects will need to add it.
  94. •Require.c tests for any required fpu, cpu, and version of QuickDraw, and fails gracefully if they're absent.
  95. •All demos now call Require.c to test for presence of any required fpu, cpu, and version of quickdraw, instead of crashing.
  96. •Enhanced GDUncorrectedGamma() in GDVideo.c to work correctly with video devices that use any version of the gamma table. This might have caused TestCluts to report spurious driver errors.
  97. •Replaced IdentifyCompiler.c and IdentifyMachine.c by the new Identify.c. Added IdentifyVideo(device) and IdentifyModel().
  98. •Renamed TestSetEntriesQuickly to TestCluts, and enhanced it to save detailed results in file.
  99. •Enhanced CopyBitsQuickly to return a nonzero int if an error occurred.
  100. •Added an image-multiplication mode to CopyBitsQuickly, and enabled it on 2/18/93.
  101. •Added SwapPriority() to SetPriority.c, to be used just like SwapMMUMode().
  102. •ConvolveX.c now rounds to nearest integer, and supports 32-bit video addressing.
  103. •Renamed the file MatLab.c to ReadMatLabFile.c, though the functions themselves are unchanged.
  104. •Introduced MATLAB conditional into VideoToolbox.h, to support creation of MatLab external code resources, as implemented by David Brainard.
  105.  
  106. CHANGES DURING 1/93:
  107. •Enhanced PatchMacIIciVideoDriver in GDVideo.c to deal with ROM- as well as RAM-based video drivers.
  108. •Renamed CopyQuickdrawGlobals to CopyQuickDrawGlobals. Old spelling is still supported for backward compatibility.
  109. •Enhanced the cache-staleness tests in SetOnePixel.c.
  110. •GDGetEntries() in GDVideo.c now returns statusErr instead of calling any video driver that is known to crash.
  111. •Deleted GDIndentify.c after merging its contents into GDVideo.c.
  112. •Spruced up the documentation in GDVideo.c.
  113. •TimeVideo 1.09 works on virtually any Mac, even if Color QuickDraw is missing. Thanks to jonathan brecher for reporting that it crashed without Color QuickDraw.
  114. •Enhanced GDMovieRate() in GDFrameRate.c to work even when Color QuickDraw is absent.
  115. •Fixed bug so that CopyBitsQuickly and RectToAddress now handle BitMaps correctly.
  116. •Added a list of known driver bugs to the "Video synch" file. Also explained to Mac IIci users how to fix their built-in video driver's GetEntries bug.
  117. •Added PatchMacIIciVideoDriver(), in GDVideo.c, to automatically patch the buggy driver (until reboot), the first time GDGetEntries is called, so that we can finally read the Mac IIci's clut.
  118. •Added utilities GetVideoDrivers and GetSlotDrivers, which copy all drivers into resource files, for subsequent perusal in ResEdit.
  119. •Fixed bug in GetPixmapPixel() in SetOnePixel.c.
  120. •Added MatLab.c to read and write MATLAB binary data files.
  121.  
  122. CHANGES DURING 12/92:
  123. •Changed "CLUT" to "Clut" in all symbolic names.
  124. •Added GDClutSize() to GDVideo.c, returning the current number of entries in the video driver's clut.
  125. •Enhanced TestSetEntriesQuickly to also test the driver, and made it compatible with System 6 as well as 7.
  126. •Doubled the speed of all the routines in SetOnePixel.c by caching parameters of the Bit/Pixmap. Programs that modify the Bit/Pixmap structure, e.g. changing the origin, should invalidate that cache by calling Set/GetPixmapPixel with a NULL Pixmap pointer. The demo FlickeringGrating benefits from this increased speed.
  127. •Moved Luminance.doc from VideoToolboxSources to Notes folder.
  128. •Minor enhancement to Luminance.c to add support for 9-bit dacs (and less-than-8-bit dacs), but the package has still only been tested with 8-bit dacs.
  129. •Fixed minor error in Luminance.c that could prevent using the THINK C Debugger inside SetLuminanceRange(). (Thanks to Wei Xie and Ken Alexander for reporting the bug and fix.)
  130. •Renamed GDLinearGamma to GDUncorrectedGamma in GDVideo.c, to more accurately describe its function, and enhanced it to support all DAC sizes. For backward compatibility, VideoToolbox.h defines GDLinearGamma as an alias for GDUncorrectedGamma.
  131. •Enhanced RestoreCluts() so that it always works.
  132. •Enhanced GDRestoreDeviceCLUT(). Passing a NULL argument now restores cluts for all the screens. Now renamed GDRestoreDeviceClut to be consistent with Apple's capitalization of RestoreDeviceClut.
  133. •Introduced (12/2) and removed (12/8) a bug that disabled CopyBitsQuickly.
  134. •Added SetEntriesQuickly.c, written by Raynald Comtois, Peter Lennie, Bill Haake, and Denis Pelli, that provides fast clut load for many popular video cards, bypassing the video driver. That file also includes macsetlt() and WaitForBlanking(). Added new demo, TestSetEntriesQuickly.c, and deleted TestCLUT.c, which it supercedes.
  135. •After extensive testing, released version 1.0 of TimeVideo.
  136. •Fixed minor Quick3 bug that could cause the last character in a data file to be missed. (Error was in MyFGets.c.)
  137.  
  138. CHANGES DURING 11/92:
  139. •Fixed bug in VBLInstall.c that could occasionally cause crash at program exit (e.g. in TimeVideo).
  140. •Fixed bug in Quick3 the prevented opening data file unless in same directory as Quick3.
  141. •Removed “Goodies from others” folder, prior to posting in public archives.
  142. •Eliminated ConvolveY.c, by incorporating it into ConvolveX.c.
  143. •InverseNormal(0) now returns -INF, and InverseNormal(1) returns INF.
  144.  
  145. CHANGES DURING 10/92:
  146. •Added VLambda.c which returns the interpolated visual sensitivity, scotopic or photopic, based on the Wyszecki and Stiles tables.
  147. •Debugged TimeVideo.c and  GDFrameRate.c to work on all Macs under Systems 6 and 7, and made many minor enhancements.
  148. •New "Video synch" file discusses how to synchronize a program to a video card. (Was briefly called "Video".)
  149. •Enhanced VBLInstall.c to automatically create and dispose of the timer needed by FrameSubroutine, for painless frame synchronization. This will REQUIRE CHANGES to programs written using the 9/92 version of the VideoToolbox, since at that time it was the user's responsibility to allocate and dispose of the timer. To alert you to the change, "FrameSubroutine" is no longer "published" in VideoToolbox.h. Just pass NULL in the subroutine field of the VBLTaskAndA5 struct that you pass to VBLInstall. (You no longer need to pass anything in the "ptr" field.)
  150. •Tweaked MaximizeConsoleHeight() to prevent clipping at bottom of screen.
  151. •Added GDRestoreDeviceCLUT() to GDVideo.c
  152. •Sped up PixMapToPostScript.c, and added support for PixMaps that require 32-bit addressing (e.g. video screens).
  153.  
  154. CHANGES DURING 9/92:
  155. •Added randUL()  to randU.c, returning a 32-bit random number.
  156. •Added nrandU(i)  and nrandUL(i) to nrand.c, returning random samples (of type unsigned short or long) from the range [0,i-1].
  157. •VBLInstall.c's default behavior now is to discard bogus interrupts, to allow reliable video frame synchronization on all video cards. (Suggested by Raynald Comtois.)
  158. •TimeVideo is significantly enhanced. Try it.
  159. •GDFrameRate.c now always returns true frame rate. Added GDVBLRate() and GDMovieRate().
  160. •NewPaletteManager() in QD32Exists.c has been made slightly more conservative.
  161. •Fixed GetDeviceSlot() to return -1 (instead of 0) if GDHandle is invalid, since 0 is a valid slot.
  162.  
  163. CHANGES DURING 8/92:
  164. •Added Timer.c, an accurate reentrant interval timer based on Apple's Time Manager. StopTimer() returns the time in µs that elapsed since calling StartTimer(). Deleted obsolete TimeIt.c.
  165. •New demo TimeVideo checks out the timing of all your video hardware and saves the results in a data file. Added a new section to the Read Me file, on "SYNCHRONIZING YOUR PROGRAM TO YOUR VIDEO CARD". Everyone that cares about timing should run TimeVideo.
  166. •Added GDFrameRate.c, which measures the frame rate of a video device in Hz; GDFramesPerCLUTUpdate() measures how long it takes to update the clut, in frames. Updated TestGDVideo to use these routines.
  167. •Added TrapAvailable.c, from Apple.
  168. •Added VBLInstall.c that implements a once-per-video-frame interrupt suitable for use with all video devices.
  169. •Added PrintAssignment() to ReadAssignments.c, to print out the value of a variable, as an assignment statement, suitable for reading by the ReadAssignment routines.
  170. •Deleted obsolete GDPrintf.c. Moved MyFgets.c to Quick3 folder.
  171. •All routines now check for 8-bit quickdraw before using GDevices.
  172. •GetDeviceSlot() now returns -1 if none, since zero is a legal slot.
  173.  
  174. CHANGES DURING 7/92:
  175. •Added suggestion to Read Me file that you enable THINK C’s "Require prototypes" option (under "Language Settings").
  176. •Happily discovered that all the demos are compatible with 32-bit addressing and virtual memory.
  177. •Requests for copies of the VideoToolbox disk no longer need be accompanied by a blank floppy. Email and reprint requests are fine. Be sure to include your mailing address, as the VideoToolbox is too big for email.
  178. •Added FlushCacheRange.c from Apple, which provides a machine-independent way of flushing your processor's instruction and data caches.
  179.  
  180. CHANGES DURING 6/92:
  181. •Minor enhancements of CalibrateLuminance.c and GetVoltage.c.
  182.  
  183. CHANGES DURING 5/92:
  184. •Expanded the documentation of ReadAssignments.c.
  185.  
  186. CHANGES DURING 4/92:
  187. •SndPlay1.c plays sounds asynchronously, i.e. while you're doing other stuff.
  188. •CreateTrialSnds.c creates some snd resources to make sounds that I find well suited to psychophysical testing.
  189. •Eliminated spurious inclusion of nr.h header file in Binomial.c.
  190. •Replaced old SetIPixel.c by new SetOnePixel.c, which is now handles bitmaps and pixmaps with any pixel size.
  191. •Added RestoreDeviceCluts.c to automatically restore all screens to normal.
  192. •Added BinomialSampleQuickly() to Binomial.c.
  193. •Added NoiseVBL to the Demo folder. It shows how to synchronize your program to the video monitor by means of the vertical blanking level interrupt.
  194. •Enhanced ReadAssignments.c, mainly by adding ReadAssignmentBlock(), which reads until it finds a blank line.
  195. •MakeNoise.c: Eliminated obscure bug that would cause a crash if the supplied PixMap had negative left or top bounds.
  196. •Removed the obsolete folder called (Header files for THINK C 4). Contact me if you need it.
  197.  
  198. CHANGES DURING 3/92:
  199. •QD32Exists.c now uses Gestalt(), if available, instead of SysEnvirons().
  200. •mc68881.h defines MPW C's mc68881 and mc68020 preprocessor symbols for THINK C, so your programs can use them in "if" statements without worrying about which compiler you're using. The symbols are 1 (i.e. true) if the compiled code requires the chip (or better) and 0 otherwise.
  201. •Made two changes to the Numerical Recipes files, correcting one prototype and making another more explicit, to satisfy the now more stringent testing of THINK C 5. (You must buy your own copy of the Numerical Recipes and make the changes. See my "Read Me" file.)
  202. •Updated the 68881 compiler option test in all the demos for compatibility with THINK C 5.
  203. •Updated Quick3 for compatibility with VideoToolbox, and made it faster (mostly by defining preprocessor substitutions in the header file Quick3.h).
  204. •GetScreenDevice.c now skips inactive devices, for compatibility with the "Blind Monitors" program available from CompuServe.
  205.  
  206. CHANGES DURING 2/92:
  207. •Fixed bugs in GetWindowDevice() in GetScreenDevice.c
  208. •Made optional the myGDHandle argument to GDDisposeWindow() in GDOpenWindow.c
  209. •Added Normal2D() etc. to Normal.c
  210.  
  211. CHANGES DURING 1/92:
  212. •Renamed xxxPDF routines to xxxPdf.
  213. •Rewrote IsNan() for speed and added IsInf() and IsFinite(). IsNan() now returns the index (1..255) of the NAN, or zero if not a NAN.
  214. •Added CopyQuickdrawGlobals.c for THINK C users of both console and MacTraps.
  215.  
  216. CHANGES DURING 9-12/91:
  217. •Added TitleBarHeight.c, which returns the height of a window's title bar, in pixels.
  218. •Added UniformSample() in Uniform.c providing a random sample from the interval [0,1).
  219. •Added IsInf() routine to IsNan.c file and IsNotFinite() macro to VideoToolbox.h.
  220. •Rewrote IsNan(), making it five times faster.
  221. •Added new routine to Luminance.c: IncrementLuminance() is used to obtain the lowest possible contrast.
  222.  
  223. CHANGES DURING 8/91:
  224. •New routine RandFill(address,bytes) fills a buffer with random bits very quickly, about 1 µs/byte on a Mac IIci.
  225. •New routines: ReadAssignments.c and ReadLuminanceRecord.c. ReadAssignments is a runtime C interpreter that only accepts assignments and comments.
  226. •Updated everything to be compatible with THINK C 5.0. Still works with version 4 as well.
  227. •All sources in the VideoToolboxSources folder (except kbhit.c) now compile without error under MPW C 3.2.
  228.  
  229. CHANGES DURING 7/91:
  230. •Most sources now compile without error under the MPW C 3.1 compiler. SetPriority has been rewritten and is now compatible with MPW C. kbhit.c is still incompatible with MPW C. CopyBitsQuickly.c generates slower code when compiled by MPW C than when compiled by THINK C.
  231.  
  232. CHANGES DURING 6/91:
  233. •CalibrateLuminance. Fixed bug in GetALuminance.c pointed out by Sujeet Paul that caused CalibrateLuminance to fail unless an A/D card was available.
  234. •TimeIt.c now carries a warning that the timing is inaccurate, about 10% too low, for reasons explained by Apple in the Time Manager chapter of Inside Mac VI.
  235. •TestGDVideo.c now times how long it takes to load the clut. It seems that all the new Apple video cards take 30 ms (two frames!!) to load the clut.
  236.  
  237. CHANGES DURING 5/91:
  238. •GetVoltage.c now automatically tries to lower the gain if a voltage overflow occurs.
  239. •New routine: IsNan.c allows you to test whether your double variable contains a Not A Number code instead of a legal number.
  240.  
  241. CHANGES DURING 4/91:
  242. •MakeNoise.c now has a new routine MakeNoise1 with a simpler interface that allows you to specify whether or not to randomize phase.
  243. •CenterRectInRect.c has two new trivial but handy routines for playing with rects: OffsetRectTile and RectInRect.
  244. •PixMapToPostScript will convert a grayscale image to a postscript file suitable for printing on a LaserWriter or Linotype.
  245. •QD32Exists.c has two new routines: QD8Exists() and NewPaletteManager() to determine existence of color quickdraw and the new palette manager (documented in Inside Mac volume VI, still unreleased). Added NewPaletteManager() call to several demos, to enhance compatibility. Thanks to Chuck Stein at UC Santa Cruz for alerting me to the need to check for the existence of the new palette manager.
  246. •RectToAddress (used by CopyBitsQuickly). Fixed obscure overflow bug that resulted in returning the wrong address (i.e. wrong rect) when rect.left*pixelSize exceeded 32K. Thanks to Brady Duga at the Center for Visual Science for reporting the bug.
  247.  
  248. CHANGES DURING 3/91:
  249. •PlotXY.c was re-written. It's now re-entrant and allows dashing of curves and plotting of symbols. However, the calling interface has changed, requiring minor changes in any program that calls it.
  250.  
  251. CHANGES DURING 2/91:
  252. •RectToAddress, and hence CopyBitsQuickly, no longer requires color quickdraw, so they should now work on all Macs.
  253. •Added SetMouse.c and HideMenuBar.c as published in THINKin' CaP, 1(2):28-29, Fall 1990 by SPLAsh Resources.
  254. •Enhanced GDIdentify to support ROM-based video drivers, as in the Mac IIsi.
  255. •Modified TestGDVideo so as to avoid a mysterious crash in GDGrayPage that occurred only if the program were run immediately after rebooting. Also replaced an old bug fix in GDGrayPage() in GDVideo.c.  The bug is in the Apple video driver for the original "Toby" video card.
  256.  
  257. CHANGES DURING 1/91:
  258. •Enhanced Binomial.c. The calls to BinomialUpperBound & BinomialLowerBound now take their arguments in a new order, and have an additional argument, the desired confidence of the interval.
  259. •Added TimeIt.c written by Bill Tuttle, and downloaded from Compuserve.
  260.  
  261. CHANGES DURING 1990:
  262. •Fixed a trivial bug in CalibrateLuminances that resulted in LuminanceRecords that had LR.VMax=0 and LR.coefficients=0. This would cause divide-by-zero errors when the LuminanceRecords were later used by the Luminance.c routines. You can fix any offending LuminanceRecord.h file by replacing the zeroes with the correct values: LR.VMax=255 and LR.coefficients=9. This bug was present for a very short time and will have affected very few people (possibly only me).
  263. •Hundredfold increase in speed of SetLuminance. On a Mac II, SetLuminances now computes an entire clut in 8 to 29 ms, depending on the luminance range. (The time grows with the number of variable DACs, which grows with the size of the luminance range.) A dynamic display uses a new clut for each 15 ms frame, so a Mac II can now compute low-contrast cluts on the fly in real time. The Mac IIci is about twice as fast as the Mac II, and the Mac IIfx is about twice as fast as the IIci, so they should be able to compute even high-contrast cluts in real time. Of course, you can still pre-compute the cluts if you prefer.
  264. •Added new THINK C header file Color.h to "Goodies from others" folder. You need these in order to use many of the new features of 32-bit Quickdraw. Deleted the now-obsolete QDOffscreen.h from VideoToolboxSources. If you use these calls then you should call the routine Q32Exists() at the beginning of your program to make sure 32-bit Quickdraw is present and quit gracefully with an explanatory error message if it isn't.
  265. •SetLuminancesAndRange() adds two more arguments allowing separate specification of the range of this particular clut and the total range that the observer will see (e.g. over time). I suggest using this instead of SetLuminances(), especially for dynamic displays.
  266. •Deleted AllocatePixMap.c since it's been superceded by Apple's NewPixMap() and NewGWorld().
  267. •Added Quick3 psychometric fitting software to Utilities folder. Quick3 fits any simple model to frequency-of-seeing data. It presently uses the Weibull function (popularized in vision by Frank Quick), but it would be easy to substitute any other.
  268. •VideoTest is now compatible with: NuVista & Mac IIci built-in video.
  269. •Apple has renamed the control and status calls, so I followed suit: GDGetPageBase replaces GDGetBaseAddr GDReset replaces GDInit GDGrayPage replace GDGrayScreen GDGetPageCnt replaces GDGetPages
  270. •SandStorm enhanced & removed the last lingering bugs. Now works fine on Mac IIci.
  271. •Added a second suggestion to "Notes.:Improve THINK C profiler"
  272. •Added MeasureMTF.
  273. •Renamed CalibrateContrast to CheckContrast.
  274. •Added CenterRectInRect, ffprintf, OpenDataFiles, Zoom.
  275. •Cosmetic updating of Luminance.c & .h and CalibrateLuminance.c for better consistency with Pelli & Zhang (1991). Luminance.c now checks for out-of-range entries.
  276. •CalibrateLuminance.c was substantially enhanced, and now allows calibration of single-monitor systems.
  277. •Polished code in GetVoltage. Now more modular and general.
  278. •GetVoltage now looks for and finds the Data Translation A/D in any slot.
  279. •SetIPixel() and GetIPixel() now check for the presence of 32-bit QuickDraw, and--if it's present--access video memory in 32-bit mode. This makes the calls compatible with 32-bit video cards, e.g. NuVista.
  280. •MakeNoise now uses the current ForeColor and BackColor to make the noise.
  281. •Fixed bug in GDVersion() in GDIdentify.c that gave wrong version numbers for some drivers.
  282. •MakeNoise and AllocatePixMap were made compatible with 32-bit QuickDraw.
  283. •CopyBitsQuickly() didn't work on 32-bit devices (e.g. NuVista) unless 32-bit QuickDraw was installed. This has been fixed.
  284. •The demos now check for any required hardware before running, and fail gracefully instead of crashing if the requirements are not met.
  285. •The VideoTFB.c routines now check that the card is indeed a TFB card before trying to access its registers.
  286. •Most of the programs have been made compatible with MPW C 3.1.
  287. •MakeNoise.c now accepts a real expansion factor instead of just an integer.
  288. •TestGDVideo.c now special cases out all the known driver bugs, e.g. GetEntries on the Mac IIci built-in video driver. Apple has acknowledged that this is a bug in their driver. I expect it will be fixed in the next System release after 6.05.
  289. •I've changed the program and file names to conform more consistently with the Apple naming convention. Subroutine names start with a capital letter. Variables start with a lower case letter. Subsequent words in multi-word names also start with a capital, e.g. the program MakeNoise() and the variable frameBytes. Defined constants are in all capitals, with multiple words separated by an underscore, e.g. NOISE_FRAMES.
  290. •GDOpenWindow and GDDisposeWindow now declare the window pointer as CWindowPtr instead of WindowPtr. This only affects the compiler's type checking. It does not affect the operation of the program, as they've been color windows all along. It's okay to cast them back to the old fashioned WindowPtr.
  291. •Updated Filter.c slightly.
  292.